


//
//  WalletHeaderView.m
//  LuxuryGoods
//
//  Created by DCQ on 2018/5/24.
//  Copyright © 2018年 Future. All rights reserved.
//

#import "WalletHeaderView.h"
#import "LGImageManagerIO.h"
@interface WalletHeaderView()
@property (weak, nonatomic) IBOutlet UIButton *topupBtn;
@property (weak, nonatomic) IBOutlet UILabel *number;

@end
@implementation WalletHeaderView
- (void)awakeFromNib{
    
    [super awakeFromNib];
    UIImage *img = [LGImageManagerIO createGradualColorImage:self.topupBtn.size startColor:UIColorFromRGB(0xffce8c) endColor:UIColorFromRGB(0xc69657)];
    [self.topupBtn setBackgroundImage:img forState:UIControlStateNormal];
}
- (void)setupWalletMoney:(NSString *)amount{
    self.number.text = [NSString stringWithFormat:@"%@",amount];
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/
- (IBAction)withdrawalAction:(id)sender {
    if (self.btnBlock) {
        self.btnBlock(WalletTouchType_withdrawal);
    }
}
- (IBAction)topupAction:(id)sender {
    if (self.btnBlock) {
        self.btnBlock(WalletTouchType_topup);
    }
}

@end
